{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "text/html": "        <script type=\"text/javascript\">\n        window.PlotlyConfig = {MathJaxConfig: 'local'};\n        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n        if (typeof require !== 'undefined') {\n        require.undef(\"plotly\");\n        requirejs.config({\n            paths: {\n                'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n            }\n        });\n        require(['plotly'], function(Plotly) {\n            window._Plotly = Plotly;\n        });\n        }\n        </script>\n        "
     },
     "metadata": {}
    },
    {
     "output_type": "display_data",
     "data": {
      "text/html": "        <script type=\"text/javascript\">\n        window.PlotlyConfig = {MathJaxConfig: 'local'};\n        if (window.MathJax) {MathJax.Hub.Config({SVG: {font: \"STIX-Web\"}});}\n        if (typeof require !== 'undefined') {\n        require.undef(\"plotly\");\n        requirejs.config({\n            paths: {\n                'plotly': ['https://cdn.plot.ly/plotly-latest.min']\n            }\n        });\n        require(['plotly'], function(Plotly) {\n            window._Plotly = Plotly;\n        });\n        }\n        </script>\n        "
     },
     "metadata": {}
    }
   ],
   "source": [
    "import pandas as pd\n",
    "\n",
    "import numpy as np\n",
    "\n",
    "import statsmodels.formula.api as smf\n",
    "\n",
    "from scipy.stats import norm\n",
    "\n",
    "from datetime import date\n",
    "\n",
    "import chart_studio.plotly as py\n",
    "import plotly.graph_objs as go\n",
    "from plotly.subplots import make_subplots\n",
    "from plotly.offline import iplot, init_notebook_mode\n",
    "import plotly.io as pio\n",
    "import plotly.express as px\n",
    "\n",
    "# Using plotly + cufflinks in offline mode\n",
    "import cufflinks\n",
    "cufflinks.go_offline(connected=True)\n",
    "init_notebook_mode(connected=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Shelter in Place Dates\n",
    "state_county_lockdown = pd.read_csv('../../data/nytimes/county-shelter-in-place.csv')\n",
    "# County Population\n",
    "state_county_pop = pd.read_csv('../../data/census/co-est2019-alldata.csv', encoding = 'latin-1')\n",
    "census_var = 'CENSUS2010POP'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "# National Figure Plot\n",
    "nat_lockdown = pd.merge(state_county_lockdown,state_county_pop[['STATE','COUNTY',census_var]],\n",
    "                        on=['STATE','COUNTY'])\n",
    "nat_lockdown.loc[nat_lockdown.SHELTER_DATE.isnull(),'SHELTER_DATE'] = '12/31/2020'\n",
    "nat_lockdown['SHELTER_dt'] = pd.to_datetime(nat_lockdown.SHELTER_DATE)\n",
    "nat_lockdown = pd.DataFrame(nat_lockdown.groupby('SHELTER_dt')[census_var].sum())\n",
    "nat_lockdown['cumulative_pop'] = nat_lockdown[census_var].cumsum()\n",
    "nat_lockdown['pop_share_lock'] = nat_lockdown.cumulative_pop/nat_lockdown.loc['12/31/2020']['cumulative_pop']\n",
    "nat_lockdown = nat_lockdown[:'04-05-2020']\n",
    "\n",
    "idx = pd.date_range('03-14-2020', '04-05-2020')\n",
    "\n",
    "nat_lockdown = nat_lockdown.reindex(idx)\n",
    "nat_lockdown.fillna(method='ffill',inplace=True)\n",
    "nat_lockdown.fillna(0,inplace=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "line": {
          "color": "black"
         },
         "textfont": {
          "color": "black"
         },
         "type": "scatter",
         "x": [
          "2020-03-14T00:00:00",
          "2020-03-15T00:00:00",
          "2020-03-16T00:00:00",
          "2020-03-17T00:00:00",
          "2020-03-18T00:00:00",
          "2020-03-19T00:00:00",
          "2020-03-20T00:00:00",
          "2020-03-21T00:00:00",
          "2020-03-22T00:00:00",
          "2020-03-23T00:00:00",
          "2020-03-24T00:00:00",
          "2020-03-25T00:00:00",
          "2020-03-26T00:00:00",
          "2020-03-27T00:00:00",
          "2020-03-28T00:00:00",
          "2020-03-29T00:00:00",
          "2020-03-30T00:00:00",
          "2020-03-31T00:00:00",
          "2020-04-01T00:00:00",
          "2020-04-02T00:00:00",
          "2020-04-03T00:00:00",
          "2020-04-04T00:00:00",
          "2020-04-05T00:00:00"
         ],
         "y": [
          0,
          0,
          0.019812938239456356,
          0.019812938239456356,
          0.019812938239456356,
          0.12066476172409477,
          0.12066476172409477,
          0.19138398622351033,
          0.25461256771068314,
          0.38363176590052434,
          0.5279143942911372,
          0.5816072644275729,
          0.6277047332708349,
          0.6680834422785338,
          0.6861008074527185,
          0.6881960864355869,
          0.7820082590323547,
          0.8202621430955039,
          0.8425734090827616,
          0.8642775641829821,
          0.9270549268172894,
          0.9399090590716992,
          0.9399090590716992
         ]
        },
        {
         "mode": "text",
         "text": [
          "Week Ending March 21",
          "Week Ending March 28",
          "Week Ending April 4"
         ],
         "textfont": {
          "color": "black"
         },
         "type": "scatter",
         "x": [
          "2020-03-17",
          "2020-03-24",
          "2020-04-01"
         ],
         "y": [
          0.55,
          0.15,
          0.65
         ]
        }
       ],
       "layout": {
        "margin": {
         "b": 20,
         "l": 20,
         "r": 20,
         "t": 0
        },
        "shapes": [
         {
          "fillcolor": "White",
          "layer": "below",
          "line": {
           "width": 0
          },
          "opacity": 0.5,
          "type": "rect",
          "x0": "2020-03-14",
          "x1": "2020-03-21",
          "xref": "x",
          "y0": -0.001,
          "y1": 1,
          "yref": "paper"
         },
         {
          "fillcolor": "LightGray",
          "layer": "below",
          "line": {
           "width": 0
          },
          "opacity": 0.5,
          "type": "rect",
          "x0": "2020-03-21",
          "x1": "2020-03-28",
          "xref": "x",
          "y0": -0.001,
          "y1": 1,
          "yref": "paper"
         },
         {
          "fillcolor": "Gray",
          "layer": "below",
          "line": {
           "width": 0
          },
          "opacity": 0.3,
          "type": "rect",
          "x0": "2020-03-28",
          "x1": "2020-04-04",
          "xref": "x",
          "y0": -0.001,
          "y1": 1,
          "yref": "paper"
         }
        ],
        "showlegend": false,
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "xaxis": {
         "tickfont": {
          "color": "black"
         },
         "title": {
          "text": ""
         }
        },
        "yaxis": {
         "tickfont": {
          "color": "black"
         },
         "title": {
          "font": {
           "color": "black"
          },
          "text": "Share of Population Under Stay-at-Home Order"
         }
        }
       }
      },
      "text/html": "<div>                            <div id=\"778aecd6-4278-4aa6-8ad4-32902296dd76\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                require([\"plotly\"], function(Plotly) {                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"778aecd6-4278-4aa6-8ad4-32902296dd76\")) {                    Plotly.newPlot(                        \"778aecd6-4278-4aa6-8ad4-32902296dd76\",                        [{\"line\": {\"color\": \"black\"}, \"textfont\": {\"color\": \"black\"}, \"type\": \"scatter\", \"x\": [\"2020-03-14T00:00:00\", \"2020-03-15T00:00:00\", \"2020-03-16T00:00:00\", \"2020-03-17T00:00:00\", \"2020-03-18T00:00:00\", \"2020-03-19T00:00:00\", \"2020-03-20T00:00:00\", \"2020-03-21T00:00:00\", \"2020-03-22T00:00:00\", \"2020-03-23T00:00:00\", \"2020-03-24T00:00:00\", \"2020-03-25T00:00:00\", \"2020-03-26T00:00:00\", \"2020-03-27T00:00:00\", \"2020-03-28T00:00:00\", \"2020-03-29T00:00:00\", \"2020-03-30T00:00:00\", \"2020-03-31T00:00:00\", \"2020-04-01T00:00:00\", \"2020-04-02T00:00:00\", \"2020-04-03T00:00:00\", \"2020-04-04T00:00:00\", \"2020-04-05T00:00:00\"], \"y\": [0.0, 0.0, 0.019812938239456356, 0.019812938239456356, 0.019812938239456356, 0.12066476172409477, 0.12066476172409477, 0.19138398622351033, 0.25461256771068314, 0.38363176590052434, 0.5279143942911372, 0.5816072644275729, 0.6277047332708349, 0.6680834422785338, 0.6861008074527185, 0.6881960864355869, 0.7820082590323547, 0.8202621430955039, 0.8425734090827616, 0.8642775641829821, 0.9270549268172894, 0.9399090590716992, 0.9399090590716992]}, {\"mode\": \"text\", \"text\": [\"Week Ending March 21\", \"Week Ending March 28\", \"Week Ending April 4\"], \"textfont\": {\"color\": \"black\"}, \"type\": \"scatter\", \"x\": [\"2020-03-17\", \"2020-03-24\", \"2020-04-01\"], \"y\": [0.55, 0.15, 0.65]}],                        {\"margin\": {\"b\": 20, \"l\": 20, \"r\": 20, \"t\": 0}, \"shapes\": [{\"fillcolor\": \"White\", \"layer\": \"below\", \"line\": {\"width\": 0}, \"opacity\": 0.5, \"type\": \"rect\", \"x0\": \"2020-03-14\", \"x1\": \"2020-03-21\", \"xref\": \"x\", \"y0\": -0.001, \"y1\": 1, \"yref\": \"paper\"}, {\"fillcolor\": \"LightGray\", \"layer\": \"below\", \"line\": {\"width\": 0}, \"opacity\": 0.5, \"type\": \"rect\", \"x0\": \"2020-03-21\", \"x1\": \"2020-03-28\", \"xref\": \"x\", \"y0\": -0.001, \"y1\": 1, \"yref\": \"paper\"}, {\"fillcolor\": \"Gray\", \"layer\": \"below\", \"line\": {\"width\": 0}, \"opacity\": 0.3, \"type\": \"rect\", \"x0\": \"2020-03-28\", \"x1\": \"2020-04-04\", \"xref\": \"x\", \"y0\": -0.001, \"y1\": 1, \"yref\": \"paper\"}], \"showlegend\": false, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"tickfont\": {\"color\": \"black\"}, \"title\": {\"text\": \"\"}}, \"yaxis\": {\"tickfont\": {\"color\": \"black\"}, \"title\": {\"font\": {\"color\": \"black\"}, \"text\": \"Share of Population Under Stay-at-Home Order\"}}},                        {\"responsive\": true}                    ).then(function(){\n                            \nvar gd = document.getElementById('778aecd6-4278-4aa6-8ad4-32902296dd76');\nvar x = new MutationObserver(function (mutations, observer) {{\n        var display = window.getComputedStyle(gd).display;\n        if (!display || display === 'none') {{\n            console.log([gd, 'removed!']);\n            Plotly.purge(gd);\n            observer.disconnect();\n        }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n    x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n    x.observe(outputEl, {childList: true});\n}}\n\n                        })                };                });            </script>        </div>"
     },
     "metadata": {}
    }
   ],
   "source": [
    "fig_nat = go.Figure(data=[go.Scatter(y=nat_lockdown[:date.today()]['pop_share_lock'], \n",
    "                                    x=nat_lockdown[:date.today()].index,line=dict(color=\"black\"),\n",
    "                                    textfont=dict(color=\"black\"))])\n",
    "\n",
    "fig_nat.update_xaxes(title_text='',tickfont=dict(color='black'))\n",
    "fig_nat.update_yaxes(title_text='Share of Population Under Stay-at-Home Order',title_font=dict(color='black'),tickfont=dict(color='black'))\n",
    "fig_nat.update_layout(margin = dict(l=20, r=20, t=0, b=20))\n",
    "\n",
    "\n",
    "# Create scatter trace of text labels\n",
    "fig_nat.add_trace(go.Scatter(\n",
    "    x=['2020-03-17', '2020-03-24','2020-04-01'],\n",
    "    y=[.55, .15, .65],\n",
    "    text=[\"Week Ending March 21\",\"Week Ending March 28\", \"Week Ending April 4\"],\n",
    "    mode=\"text\",\n",
    "    textfont=dict(\n",
    "        color=\"black\"\n",
    "    )\n",
    "))\n",
    "\n",
    "fig_nat.update_layout(showlegend=False,\n",
    "    shapes=[\n",
    "        # 1st highlight during Feb 4 - Feb 6\n",
    "        dict(\n",
    "            type=\"rect\",\n",
    "            # x-reference is assigned to the x-values\n",
    "            xref=\"x\",\n",
    "            # y-reference is assigned to the plot paper [0,1]\n",
    "            yref=\"paper\",\n",
    "            x0=\"2020-03-14\",\n",
    "            y0=-.001,\n",
    "            x1=\"2020-03-21\",\n",
    "            y1=1,\n",
    "            fillcolor=\"White\",\n",
    "            opacity=0.5,\n",
    "            layer=\"below\",\n",
    "            line_width=0,\n",
    "        ),\n",
    "        dict(\n",
    "            type=\"rect\",\n",
    "            # x-reference is assigned to the x-values\n",
    "            xref=\"x\",\n",
    "            # y-reference is assigned to the plot paper [0,1]\n",
    "            yref=\"paper\",\n",
    "            x0=\"2020-03-21\",\n",
    "            y0=-.001,\n",
    "            x1=\"2020-03-28\",\n",
    "            y1=1,\n",
    "            fillcolor=\"LightGray\",\n",
    "            opacity=0.5,\n",
    "            layer=\"below\",\n",
    "            line_width=0,\n",
    "        ),\n",
    "        dict(\n",
    "            type=\"rect\",\n",
    "            # x-reference is assigned to the x-values\n",
    "            xref=\"x\",\n",
    "            # y-reference is assigned to the plot paper [0,1]\n",
    "            yref=\"paper\",\n",
    "            x0=\"2020-03-28\",\n",
    "            y0=-.001,\n",
    "            x1=\"2020-04-04\",\n",
    "            y1=1,\n",
    "            fillcolor=\"Gray\",\n",
    "            opacity=0.3,\n",
    "            layer=\"below\",\n",
    "            line_width=0,\n",
    "        )\n",
    "    ]\n",
    ")\n",
    "\n",
    "fig_nat.show()\n",
    "\n",
    "fig_nat.write_image(\"../../output/plots/nat-SAH-share.pdf\", \n",
    "                    width=900, height=400, scale=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "state_df = pd.read_stata('../../data/stata/state_build.dta')\n",
    "# State Stay at Home thru April 4\n",
    "apr4_idx = state_df.daten == '2020-04-04'"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "marker": {
          "color": "black"
         },
         "name": "Employment Weighted Duration of Stay-at-Home (in Weeks)",
         "textfont": {
          "color": "black"
         },
         "type": "bar",
         "x": [
          "ALABAMA",
          "ALASKA",
          "ARIZONA",
          "ARKANSAS",
          "CALIFORNIA",
          "COLORADO",
          "CONNECTICUT",
          "DELAWARE",
          "DISTRICT OF COLUMBIA",
          "FLORIDA",
          "GEORGIA",
          "HAWAII",
          "IDAHO",
          "ILLINOIS",
          "INDIANA",
          "IOWA",
          "KANSAS",
          "KENTUCKY",
          "LOUISIANA",
          "MAINE",
          "MARYLAND",
          "MASSACHUSETTS",
          "MICHIGAN",
          "MINNESOTA",
          "MISSISSIPPI",
          "MISSOURI",
          "MONTANA",
          "NEBRASKA",
          "NEVADA",
          "NEW HAMPSHIRE",
          "NEW JERSEY",
          "NEW MEXICO",
          "NEW YORK",
          "NORTH CAROLINA",
          "NORTH DAKOTA",
          "OHIO",
          "OKLAHOMA",
          "OREGON",
          "PENNSYLVANIA",
          "RHODE ISLAND",
          "SOUTH CAROLINA",
          "SOUTH DAKOTA",
          "TENNESSEE",
          "TEXAS",
          "UTAH",
          "VERMONT",
          "VIRGINIA",
          "WASHINGTON",
          "WEST VIRGINIA",
          "WISCONSIN",
          "WYOMING"
         ],
         "y": [
          0.5010609625896905,
          1.1428572156000882,
          0.7142857025610283,
          0,
          2.5173233301902656,
          1.4285714938741876,
          1.857142772525549,
          1.7142857909202576,
          0.5714285969734192,
          0.9203844121329894,
          0.7936296842972297,
          1.5714284554123878,
          1.5714285349240527,
          2.1428570861608023,
          1.71428572217701,
          0,
          0.8571428604773246,
          1.428571464464767,
          1.8571427933056839,
          1.571428569033742,
          0.8571428714785725,
          1.7142857476137578,
          1.7142857209546492,
          1.285714284167625,
          0.32371719209550065,
          1.1315226895967498,
          1.142857186612673,
          0,
          0.5714285943540744,
          1.2857142630964518,
          2.1428570989519358,
          1.7142857504077256,
          2.000000006315531,
          0.8571428701252444,
          0,
          1.8571427967981435,
          0.7612768023391254,
          1.857142792432569,
          1.4133282242837595,
          1.1428572461009026,
          0.3850082568824291,
          0,
          0.8849714503157884,
          1.4277550941842492,
          0.48082202300429344,
          1.571428530383855,
          0.8571428719224059,
          1.8571427970309742,
          1.7142857203725725,
          1.5714285296271555,
          1.1428571676369756
         ]
        }
       ],
       "layout": {
        "legend": {
         "bgcolor": "LightGray",
         "bordercolor": "rgba(255, 255, 255, 0)",
         "x": 0.25,
         "y": 1
        },
        "plot_bgcolor": "LightGray",
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "xaxis": {
         "tickfont": {
          "color": "black"
         }
        },
        "yaxis": {
         "tickfont": {
          "color": "black"
         }
        }
       }
      },
      "text/html": "<div>                            <div id=\"c1c0d6ae-89ca-42a7-9541-2612e2c569fe\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                require([\"plotly\"], function(Plotly) {                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"c1c0d6ae-89ca-42a7-9541-2612e2c569fe\")) {                    Plotly.newPlot(                        \"c1c0d6ae-89ca-42a7-9541-2612e2c569fe\",                        [{\"marker\": {\"color\": \"black\"}, \"name\": \"Employment Weighted Duration of Stay-at-Home (in Weeks)\", \"textfont\": {\"color\": \"black\"}, \"type\": \"bar\", \"x\": [\"ALABAMA\", \"ALASKA\", \"ARIZONA\", \"ARKANSAS\", \"CALIFORNIA\", \"COLORADO\", \"CONNECTICUT\", \"DELAWARE\", \"DISTRICT OF COLUMBIA\", \"FLORIDA\", \"GEORGIA\", \"HAWAII\", \"IDAHO\", \"ILLINOIS\", \"INDIANA\", \"IOWA\", \"KANSAS\", \"KENTUCKY\", \"LOUISIANA\", \"MAINE\", \"MARYLAND\", \"MASSACHUSETTS\", \"MICHIGAN\", \"MINNESOTA\", \"MISSISSIPPI\", \"MISSOURI\", \"MONTANA\", \"NEBRASKA\", \"NEVADA\", \"NEW HAMPSHIRE\", \"NEW JERSEY\", \"NEW MEXICO\", \"NEW YORK\", \"NORTH CAROLINA\", \"NORTH DAKOTA\", \"OHIO\", \"OKLAHOMA\", \"OREGON\", \"PENNSYLVANIA\", \"RHODE ISLAND\", \"SOUTH CAROLINA\", \"SOUTH DAKOTA\", \"TENNESSEE\", \"TEXAS\", \"UTAH\", \"VERMONT\", \"VIRGINIA\", \"WASHINGTON\", \"WEST VIRGINIA\", \"WISCONSIN\", \"WYOMING\"], \"y\": [0.5010609625896905, 1.1428572156000882, 0.7142857025610283, 0.0, 2.5173233301902656, 1.4285714938741876, 1.857142772525549, 1.7142857909202576, 0.5714285969734192, 0.9203844121329894, 0.7936296842972297, 1.5714284554123878, 1.5714285349240527, 2.1428570861608023, 1.71428572217701, 0.0, 0.8571428604773246, 1.428571464464767, 1.8571427933056839, 1.571428569033742, 0.8571428714785725, 1.7142857476137578, 1.7142857209546492, 1.285714284167625, 0.32371719209550065, 1.1315226895967498, 1.142857186612673, 0.0, 0.5714285943540744, 1.2857142630964518, 2.1428570989519358, 1.7142857504077256, 2.000000006315531, 0.8571428701252444, 0.0, 1.8571427967981435, 0.7612768023391254, 1.857142792432569, 1.4133282242837595, 1.1428572461009026, 0.3850082568824291, 0.0, 0.8849714503157884, 1.4277550941842492, 0.48082202300429344, 1.571428530383855, 0.8571428719224059, 1.8571427970309742, 1.7142857203725725, 1.5714285296271555, 1.1428571676369756]}],                        {\"legend\": {\"bgcolor\": \"LightGray\", \"bordercolor\": \"rgba(255, 255, 255, 0)\", \"x\": 0.25, \"y\": 1.0}, \"plot_bgcolor\": \"LightGray\", \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"tickfont\": {\"color\": \"black\"}}, \"yaxis\": {\"tickfont\": {\"color\": \"black\"}}},                        {\"responsive\": true}                    ).then(function(){\n                            \nvar gd = document.getElementById('c1c0d6ae-89ca-42a7-9541-2612e2c569fe');\nvar x = new MutationObserver(function (mutations, observer) {{\n        var display = window.getComputedStyle(gd).display;\n        if (!display || display === 'none') {{\n            console.log([gd, 'removed!']);\n            Plotly.purge(gd);\n            observer.disconnect();\n        }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n    x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n    x.observe(outputEl, {childList: true});\n}}\n\n                        })                };                });            </script>        </div>"
     },
     "metadata": {}
    }
   ],
   "source": [
    "fig_state_shares = go.Figure()\n",
    "\n",
    "fig_state_shares.add_trace(go.Bar(x=state_df[apr4_idx]['state_name'],\n",
    "                y=state_df[apr4_idx]['SAH_cumexp'],\n",
    "                name='Employment Weighted Duration of Stay-at-Home (in Weeks)',\n",
    "                marker_color='black',\n",
    "                textfont=dict(color=\"black\")\n",
    "                ))\n",
    "\n",
    "fig_state_shares.update_layout(\n",
    "    legend=dict(\n",
    "        x=.25,\n",
    "        y=1.0,\n",
    "        bgcolor='LightGray',\n",
    "        bordercolor='rgba(255, 255, 255, 0)'\n",
    "    ),\n",
    "    plot_bgcolor='LightGray'\n",
    ")\n",
    "fig_state_shares.update_xaxes(tickfont=dict(color='black'))\n",
    "fig_state_shares.update_yaxes(tickfont=dict(color='black'))\n",
    "\n",
    "fig_state_shares.show()\n",
    "\n",
    "fig_state_shares.write_image(\"../../output/plots/state-emp-shares.pdf\", width=900, height=600, scale=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "customdata": [
          [
           "ALABAMA"
          ],
          [
           "ALASKA"
          ],
          [
           "ARIZONA"
          ],
          [
           "ARKANSAS"
          ],
          [
           "CALIFORNIA"
          ],
          [
           "COLORADO"
          ],
          [
           "CONNECTICUT"
          ],
          [
           "DELAWARE"
          ],
          [
           "DISTRICT OF COLUMBIA"
          ],
          [
           "FLORIDA"
          ],
          [
           "GEORGIA"
          ],
          [
           "HAWAII"
          ],
          [
           "IDAHO"
          ],
          [
           "ILLINOIS"
          ],
          [
           "INDIANA"
          ],
          [
           "IOWA"
          ],
          [
           "KANSAS"
          ],
          [
           "KENTUCKY"
          ],
          [
           "LOUISIANA"
          ],
          [
           "MAINE"
          ],
          [
           "MARYLAND"
          ],
          [
           "MASSACHUSETTS"
          ],
          [
           "MICHIGAN"
          ],
          [
           "MINNESOTA"
          ],
          [
           "MISSISSIPPI"
          ],
          [
           "MISSOURI"
          ],
          [
           "MONTANA"
          ],
          [
           "NEBRASKA"
          ],
          [
           "NEVADA"
          ],
          [
           "NEW HAMPSHIRE"
          ],
          [
           "NEW JERSEY"
          ],
          [
           "NEW MEXICO"
          ],
          [
           "NEW YORK"
          ],
          [
           "NORTH CAROLINA"
          ],
          [
           "NORTH DAKOTA"
          ],
          [
           "OHIO"
          ],
          [
           "OKLAHOMA"
          ],
          [
           "OREGON"
          ],
          [
           "PENNSYLVANIA"
          ],
          [
           "RHODE ISLAND"
          ],
          [
           "SOUTH CAROLINA"
          ],
          [
           "SOUTH DAKOTA"
          ],
          [
           "TENNESSEE"
          ],
          [
           "TEXAS"
          ],
          [
           "UTAH"
          ],
          [
           "VERMONT"
          ],
          [
           "VIRGINIA"
          ],
          [
           "WASHINGTON"
          ],
          [
           "WEST VIRGINIA"
          ],
          [
           "WISCONSIN"
          ],
          [
           "WYOMING"
          ]
         ],
         "hovertemplate": "SAH_cumexp=%{x}<br>cum_claims_to_emp=%{y}<br>census2010pop=%{marker.size}<br>state_name=%{customdata[0]}<br><b>Conf. C19 <br>per 1K p.c.</b>=%{marker.color}<extra></extra>",
         "legendgroup": "",
         "marker": {
          "color": [
           0.34144145250320435,
           0.2407667338848114,
           0.3157062828540802,
           0.2496640831232071,
           0.37273892760276794,
           0.8657447695732117,
           1.4087474346160889,
           0.6604048609733582,
           1.4990285634994507,
           0.6134678721427917,
           0.6488671898841858,
           0.2506798207759857,
           0.6864074468612671,
           0.8024546504020691,
           0.6089019775390625,
           0.25768500566482544,
           0.2446446269750595,
           0.18827630579471588,
           2.7489471435546875,
           0.3342464864253998,
           0.5412612557411194,
           1.75055730342865,
           1.405049204826355,
           0.16270969808101654,
           0.4903452396392822,
           0.38103654980659485,
           0.2840062081813812,
           0.1713809221982956,
           0.6332041025161743,
           0.4686776101589203,
           3.4337310791015625,
           0.2636973261833191,
           5.875549793243408,
           0.251901239156723,
           0.2765425145626068,
           0.32401496171951294,
           0.3084222078323364,
           0.26076239347457886,
           0.788513720035553,
           0.5643346309661865,
           0.4135890603065491,
           0.2603846788406372,
           0.4787188470363617,
           0.2530466616153717,
           0.5141313672065735,
           0.7191473841667175,
           0.3008365035057068,
           0.9575375914573669,
           0.1516464650630951,
           0.3713742196559906,
           0.3317802846431732
          ],
          "coloraxis": "coloraxis",
          "line": {
           "color": "black",
           "width": 0.75
          },
          "size": [
           4779736,
           710231,
           6392017,
           2915918,
           37253956,
           5029196,
           3574097,
           897934,
           601723,
           18801310,
           9687653,
           1360301,
           1567582,
           12830632,
           6483802,
           3046355,
           2853118,
           4339367,
           4533372,
           1328361,
           5773552,
           6547629,
           9883640,
           5303925,
           2967297,
           5988927,
           989415,
           1826341,
           2700551,
           1316470,
           8791894,
           2059179,
           19378102,
           9535483,
           672591,
           11536504,
           3751351,
           3831074,
           12702379,
           1052567,
           4625364,
           814180,
           6346105,
           25145561,
           2763885,
           625741,
           8001024,
           6724540,
           1852994,
           5686986,
           563626
          ],
          "sizemode": "area",
          "sizeref": 30411.392653061226,
          "symbol": "circle"
         },
         "mode": "markers",
         "name": "",
         "orientation": "v",
         "showlegend": false,
         "type": "scatter",
         "x": [
          0.5010609625896905,
          1.1428572156000882,
          0.7142857025610283,
          0,
          2.5173233301902656,
          1.4285714938741876,
          1.857142772525549,
          1.7142857909202576,
          0.5714285969734192,
          0.9203844121329894,
          0.7936296842972297,
          1.5714284554123878,
          1.5714285349240527,
          2.1428570861608023,
          1.71428572217701,
          0,
          0.8571428604773246,
          1.428571464464767,
          1.8571427933056839,
          1.571428569033742,
          0.8571428714785725,
          1.7142857476137578,
          1.7142857209546492,
          1.285714284167625,
          0.32371719209550065,
          1.1315226895967498,
          1.142857186612673,
          0,
          0.5714285943540744,
          1.2857142630964518,
          2.1428570989519358,
          1.7142857504077256,
          2.000000006315531,
          0.8571428701252444,
          0,
          1.8571427967981435,
          0.7612768023391254,
          1.857142792432569,
          1.4133282242837595,
          1.1428572461009026,
          0.3850082568824291,
          0,
          0.8849714503157884,
          1.4277550941842492,
          0.48082202300429344,
          1.571428530383855,
          0.8571428719224059,
          1.8571427970309742,
          1.7142857203725725,
          1.5714285296271555,
          1.1428571676369756
         ],
         "xaxis": "x",
         "y": [
          0.10407905280590057,
          0.1133020669221878,
          0.0896691083908081,
          0.08427435159683228,
          0.12751546502113342,
          0.048216138035058975,
          0.05623583495616913,
          0.11109921336174011,
          0.059164851903915405,
          0.05619437247514725,
          0.12482446432113647,
          0.16821002960205078,
          0.10756083577871323,
          0.0881362110376358,
          0.10956046730279922,
          0.10403107851743698,
          0.09355399012565613,
          0.15054471790790558,
          0.14295507967472076,
          0.12636612355709076,
          0.09124767780303955,
          0.1328134536743164,
          0.19520480930805206,
          0.11866907775402069,
          0.07596179842948914,
          0.08760331571102142,
          0.12557388842105865,
          0.07055594772100449,
          0.17848779261112213,
          0.15685969591140747,
          0.13704508543014526,
          0.08994212001562119,
          0.08530452847480774,
          0.09412423521280289,
          0.07857194542884827,
          0.13183344900608063,
          0.08231928199529648,
          0.07402023673057556,
          0.18606705963611603,
          0.19507069885730743,
          0.09110163152217865,
          0.03932502120733261,
          0.08299252390861511,
          0.06214524060487747,
          0.054962608963251114,
          0.11571358144283295,
          0.08124104887247086,
          0.14427168667316437,
          0.04893583804368973,
          0.09459748864173889,
          0.061909984797239304
         ],
         "yaxis": "y"
        },
        {
         "hovertemplate": "<b>OLS trendline</b><br>cum_claims_to_emp = 0.0194168 * SAH_cumexp + 0.08146<br>R<sup>2</sup>=0.101236<br><br>SAH_cumexp=%{x}<br>cum_claims_to_emp=%{y} <b>(trend)</b><extra></extra>",
         "legendgroup": "",
         "marker": {
          "symbol": "circle"
         },
         "mode": "lines",
         "name": "",
         "showlegend": false,
         "type": "scatter",
         "x": [
          0,
          0,
          0,
          0,
          0,
          0.32371719209550065,
          0.3850082568824291,
          0.48082202300429344,
          0.5010609625896905,
          0.5714285943540744,
          0.5714285969734192,
          0.7142857025610283,
          0.7612768023391254,
          0.7936296842972297,
          0.8571428604773246,
          0.8571428701252444,
          0.8571428714785725,
          0.8571428719224059,
          0.8849714503157884,
          0.9203844121329894,
          1.1315226895967498,
          1.1428571676369756,
          1.142857186612673,
          1.1428572156000882,
          1.1428572461009026,
          1.2857142630964518,
          1.285714284167625,
          1.4133282242837595,
          1.4277550941842492,
          1.428571464464767,
          1.4285714938741876,
          1.5714284554123878,
          1.5714285296271555,
          1.571428530383855,
          1.5714285349240527,
          1.571428569033742,
          1.7142857203725725,
          1.7142857209546492,
          1.71428572217701,
          1.7142857476137578,
          1.7142857504077256,
          1.7142857909202576,
          1.857142772525549,
          1.857142792432569,
          1.8571427933056839,
          1.8571427967981435,
          1.8571427970309742,
          2.000000006315531,
          2.1428570861608023,
          2.1428570989519358,
          2.5173233301902656
         ],
         "xaxis": "x",
         "y": [
          0.08145995669746475,
          0.08145995669746475,
          0.08145995669746475,
          0.08145995669746475,
          0.08145995669746475,
          0.08774550764937401,
          0.08893558380233088,
          0.09079598023340961,
          0.09118895561155727,
          0.09255526962150253,
          0.0925552696723618,
          0.09532909706843132,
          0.09624151370602017,
          0.09686970304212679,
          0.09810292548055632,
          0.09810292566788803,
          0.09810292569416533,
          0.09810292570278314,
          0.0986432675557398,
          0.09933087384077877,
          0.10343050287903295,
          0.1036505821364056,
          0.10365058250485286,
          0.10365058306769562,
          0.10365058365992373,
          0.10642440933581922,
          0.1064244097449539,
          0.10890226369389469,
          0.1091823872957618,
          0.10919823859164324,
          0.10919823916267998,
          0.1119720637617714,
          0.11197206520278447,
          0.11197206521747716,
          0.11197206530563325,
          0.11197206596793416,
          0.11474589425234584,
          0.1147458942636479,
          0.11474589428738224,
          0.1147458947812824,
          0.1147458948355323,
          0.11474589562215591,
          0.11751972061088595,
          0.11751972099741652,
          0.11751972101436961,
          0.11751972108218199,
          0.11751972108670282,
          0.12029355049623491,
          0.12306737739247067,
          0.12306737764083352,
          0.13033831237550642
         ],
         "yaxis": "y"
        }
       ],
       "layout": {
        "coloraxis": {
         "colorbar": {
          "title": {
           "text": "<b>Conf. C19 <br>per 1K p.c.</b>"
          }
         },
         "colorscale": [
          [
           0,
           "rgb(0, 0, 0)"
          ],
          [
           0.09090909090909091,
           "rgb(16, 16, 16)"
          ],
          [
           0.18181818181818182,
           "rgb(38, 38, 38)"
          ],
          [
           0.2727272727272727,
           "rgb(59, 59, 59)"
          ],
          [
           0.36363636363636365,
           "rgb(81, 80, 80)"
          ],
          [
           0.45454545454545453,
           "rgb(102, 101, 101)"
          ],
          [
           0.5454545454545454,
           "rgb(124, 123, 122)"
          ],
          [
           0.6363636363636364,
           "rgb(146, 146, 145)"
          ],
          [
           0.7272727272727273,
           "rgb(171, 171, 170)"
          ],
          [
           0.8181818181818182,
           "rgb(197, 197, 195)"
          ],
          [
           0.9090909090909091,
           "rgb(224, 224, 223)"
          ],
          [
           1,
           "rgb(254, 254, 253)"
          ]
         ]
        },
        "legend": {
         "itemsizing": "constant",
         "tracegroupgap": 0
        },
        "margin": {
         "t": 60
        },
        "plot_bgcolor": "White",
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "xaxis": {
         "anchor": "y",
         "domain": [
          0,
          1
         ],
         "tickfont": {
          "color": "black"
         },
         "title": {
          "font": {
           "color": "black"
          },
          "text": "Employment-Weighted Weeks of SAH Exposure"
         }
        },
        "yaxis": {
         "anchor": "x",
         "domain": [
          0,
          1
         ],
         "tickfont": {
          "color": "black"
         },
         "title": {
          "font": {
           "color": "black"
          },
          "text": "Cumulative New Claims for UI (Mar. 15 - Apr. 4)"
         }
        }
       }
      },
      "text/html": "<div>                            <div id=\"547a9b79-cba7-44a0-a578-0d2cf9c3e55c\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                require([\"plotly\"], function(Plotly) {                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"547a9b79-cba7-44a0-a578-0d2cf9c3e55c\")) {                    Plotly.newPlot(                        \"547a9b79-cba7-44a0-a578-0d2cf9c3e55c\",                        [{\"customdata\": [[\"ALABAMA\"], [\"ALASKA\"], [\"ARIZONA\"], [\"ARKANSAS\"], [\"CALIFORNIA\"], [\"COLORADO\"], [\"CONNECTICUT\"], [\"DELAWARE\"], [\"DISTRICT OF COLUMBIA\"], [\"FLORIDA\"], [\"GEORGIA\"], [\"HAWAII\"], [\"IDAHO\"], [\"ILLINOIS\"], [\"INDIANA\"], [\"IOWA\"], [\"KANSAS\"], [\"KENTUCKY\"], [\"LOUISIANA\"], [\"MAINE\"], [\"MARYLAND\"], [\"MASSACHUSETTS\"], [\"MICHIGAN\"], [\"MINNESOTA\"], [\"MISSISSIPPI\"], [\"MISSOURI\"], [\"MONTANA\"], [\"NEBRASKA\"], [\"NEVADA\"], [\"NEW HAMPSHIRE\"], [\"NEW JERSEY\"], [\"NEW MEXICO\"], [\"NEW YORK\"], [\"NORTH CAROLINA\"], [\"NORTH DAKOTA\"], [\"OHIO\"], [\"OKLAHOMA\"], [\"OREGON\"], [\"PENNSYLVANIA\"], [\"RHODE ISLAND\"], [\"SOUTH CAROLINA\"], [\"SOUTH DAKOTA\"], [\"TENNESSEE\"], [\"TEXAS\"], [\"UTAH\"], [\"VERMONT\"], [\"VIRGINIA\"], [\"WASHINGTON\"], [\"WEST VIRGINIA\"], [\"WISCONSIN\"], [\"WYOMING\"]], \"hovertemplate\": \"SAH_cumexp=%{x}<br>cum_claims_to_emp=%{y}<br>census2010pop=%{marker.size}<br>state_name=%{customdata[0]}<br><b>Conf. C19 <br>per 1K p.c.</b>=%{marker.color}<extra></extra>\", \"legendgroup\": \"\", \"marker\": {\"color\": [0.34144145250320435, 0.2407667338848114, 0.3157062828540802, 0.2496640831232071, 0.37273892760276794, 0.8657447695732117, 1.4087474346160889, 0.6604048609733582, 1.4990285634994507, 0.6134678721427917, 0.6488671898841858, 0.2506798207759857, 0.6864074468612671, 0.8024546504020691, 0.6089019775390625, 0.25768500566482544, 0.2446446269750595, 0.18827630579471588, 2.7489471435546875, 0.3342464864253998, 0.5412612557411194, 1.75055730342865, 1.405049204826355, 0.16270969808101654, 0.4903452396392822, 0.38103654980659485, 0.2840062081813812, 0.1713809221982956, 0.6332041025161743, 0.4686776101589203, 3.4337310791015625, 0.2636973261833191, 5.875549793243408, 0.251901239156723, 0.2765425145626068, 0.32401496171951294, 0.3084222078323364, 0.26076239347457886, 0.788513720035553, 0.5643346309661865, 0.4135890603065491, 0.2603846788406372, 0.4787188470363617, 0.2530466616153717, 0.5141313672065735, 0.7191473841667175, 0.3008365035057068, 0.9575375914573669, 0.1516464650630951, 0.3713742196559906, 0.3317802846431732], \"coloraxis\": \"coloraxis\", \"line\": {\"color\": \"black\", \"width\": 0.75}, \"size\": [4779736.0, 710231.0, 6392017.0, 2915918.0, 37253956.0, 5029196.0, 3574097.0, 897934.0, 601723.0, 18801310.0, 9687653.0, 1360301.0, 1567582.0, 12830632.0, 6483802.0, 3046355.0, 2853118.0, 4339367.0, 4533372.0, 1328361.0, 5773552.0, 6547629.0, 9883640.0, 5303925.0, 2967297.0, 5988927.0, 989415.0, 1826341.0, 2700551.0, 1316470.0, 8791894.0, 2059179.0, 19378102.0, 9535483.0, 672591.0, 11536504.0, 3751351.0, 3831074.0, 12702379.0, 1052567.0, 4625364.0, 814180.0, 6346105.0, 25145561.0, 2763885.0, 625741.0, 8001024.0, 6724540.0, 1852994.0, 5686986.0, 563626.0], \"sizemode\": \"area\", \"sizeref\": 30411.392653061226, \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"\", \"orientation\": \"v\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [0.5010609625896905, 1.1428572156000882, 0.7142857025610283, 0.0, 2.5173233301902656, 1.4285714938741876, 1.857142772525549, 1.7142857909202576, 0.5714285969734192, 0.9203844121329894, 0.7936296842972297, 1.5714284554123878, 1.5714285349240527, 2.1428570861608023, 1.71428572217701, 0.0, 0.8571428604773246, 1.428571464464767, 1.8571427933056839, 1.571428569033742, 0.8571428714785725, 1.7142857476137578, 1.7142857209546492, 1.285714284167625, 0.32371719209550065, 1.1315226895967498, 1.142857186612673, 0.0, 0.5714285943540744, 1.2857142630964518, 2.1428570989519358, 1.7142857504077256, 2.000000006315531, 0.8571428701252444, 0.0, 1.8571427967981435, 0.7612768023391254, 1.857142792432569, 1.4133282242837595, 1.1428572461009026, 0.3850082568824291, 0.0, 0.8849714503157884, 1.4277550941842492, 0.48082202300429344, 1.571428530383855, 0.8571428719224059, 1.8571427970309742, 1.7142857203725725, 1.5714285296271555, 1.1428571676369756], \"xaxis\": \"x\", \"y\": [0.10407905280590057, 0.1133020669221878, 0.0896691083908081, 0.08427435159683228, 0.12751546502113342, 0.048216138035058975, 0.05623583495616913, 0.11109921336174011, 0.059164851903915405, 0.05619437247514725, 0.12482446432113647, 0.16821002960205078, 0.10756083577871323, 0.0881362110376358, 0.10956046730279922, 0.10403107851743698, 0.09355399012565613, 0.15054471790790558, 0.14295507967472076, 0.12636612355709076, 0.09124767780303955, 0.1328134536743164, 0.19520480930805206, 0.11866907775402069, 0.07596179842948914, 0.08760331571102142, 0.12557388842105865, 0.07055594772100449, 0.17848779261112213, 0.15685969591140747, 0.13704508543014526, 0.08994212001562119, 0.08530452847480774, 0.09412423521280289, 0.07857194542884827, 0.13183344900608063, 0.08231928199529648, 0.07402023673057556, 0.18606705963611603, 0.19507069885730743, 0.09110163152217865, 0.03932502120733261, 0.08299252390861511, 0.06214524060487747, 0.054962608963251114, 0.11571358144283295, 0.08124104887247086, 0.14427168667316437, 0.04893583804368973, 0.09459748864173889, 0.061909984797239304], \"yaxis\": \"y\"}, {\"hovertemplate\": \"<b>OLS trendline</b><br>cum_claims_to_emp = 0.0194168 * SAH_cumexp + 0.08146<br>R<sup>2</sup>=0.101236<br><br>SAH_cumexp=%{x}<br>cum_claims_to_emp=%{y} <b>(trend)</b><extra></extra>\", \"legendgroup\": \"\", \"marker\": {\"symbol\": \"circle\"}, \"mode\": \"lines\", \"name\": \"\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [0.0, 0.0, 0.0, 0.0, 0.0, 0.32371719209550065, 0.3850082568824291, 0.48082202300429344, 0.5010609625896905, 0.5714285943540744, 0.5714285969734192, 0.7142857025610283, 0.7612768023391254, 0.7936296842972297, 0.8571428604773246, 0.8571428701252444, 0.8571428714785725, 0.8571428719224059, 0.8849714503157884, 0.9203844121329894, 1.1315226895967498, 1.1428571676369756, 1.142857186612673, 1.1428572156000882, 1.1428572461009026, 1.2857142630964518, 1.285714284167625, 1.4133282242837595, 1.4277550941842492, 1.428571464464767, 1.4285714938741876, 1.5714284554123878, 1.5714285296271555, 1.571428530383855, 1.5714285349240527, 1.571428569033742, 1.7142857203725725, 1.7142857209546492, 1.71428572217701, 1.7142857476137578, 1.7142857504077256, 1.7142857909202576, 1.857142772525549, 1.857142792432569, 1.8571427933056839, 1.8571427967981435, 1.8571427970309742, 2.000000006315531, 2.1428570861608023, 2.1428570989519358, 2.5173233301902656], \"xaxis\": \"x\", \"y\": [0.08145995669746475, 0.08145995669746475, 0.08145995669746475, 0.08145995669746475, 0.08145995669746475, 0.08774550764937401, 0.08893558380233088, 0.09079598023340961, 0.09118895561155727, 0.09255526962150253, 0.0925552696723618, 0.09532909706843132, 0.09624151370602017, 0.09686970304212679, 0.09810292548055632, 0.09810292566788803, 0.09810292569416533, 0.09810292570278314, 0.0986432675557398, 0.09933087384077877, 0.10343050287903295, 0.1036505821364056, 0.10365058250485286, 0.10365058306769562, 0.10365058365992373, 0.10642440933581922, 0.1064244097449539, 0.10890226369389469, 0.1091823872957618, 0.10919823859164324, 0.10919823916267998, 0.1119720637617714, 0.11197206520278447, 0.11197206521747716, 0.11197206530563325, 0.11197206596793416, 0.11474589425234584, 0.1147458942636479, 0.11474589428738224, 0.1147458947812824, 0.1147458948355323, 0.11474589562215591, 0.11751972061088595, 0.11751972099741652, 0.11751972101436961, 0.11751972108218199, 0.11751972108670282, 0.12029355049623491, 0.12306737739247067, 0.12306737764083352, 0.13033831237550642], \"yaxis\": \"y\"}],                        {\"coloraxis\": {\"colorbar\": {\"title\": {\"text\": \"<b>Conf. C19 <br>per 1K p.c.</b>\"}}, \"colorscale\": [[0.0, \"rgb(0, 0, 0)\"], [0.09090909090909091, \"rgb(16, 16, 16)\"], [0.18181818181818182, \"rgb(38, 38, 38)\"], [0.2727272727272727, \"rgb(59, 59, 59)\"], [0.36363636363636365, \"rgb(81, 80, 80)\"], [0.45454545454545453, \"rgb(102, 101, 101)\"], [0.5454545454545454, \"rgb(124, 123, 122)\"], [0.6363636363636364, \"rgb(146, 146, 145)\"], [0.7272727272727273, \"rgb(171, 171, 170)\"], [0.8181818181818182, \"rgb(197, 197, 195)\"], [0.9090909090909091, \"rgb(224, 224, 223)\"], [1.0, \"rgb(254, 254, 253)\"]]}, \"legend\": {\"itemsizing\": \"constant\", \"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"plot_bgcolor\": \"White\", \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"tickfont\": {\"color\": \"black\"}, \"title\": {\"font\": {\"color\": \"black\"}, \"text\": \"Employment-Weighted Weeks of SAH Exposure\"}}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0], \"tickfont\": {\"color\": \"black\"}, \"title\": {\"font\": {\"color\": \"black\"}, \"text\": \"Cumulative New Claims for UI (Mar. 15 - Apr. 4)\"}}},                        {\"responsive\": true}                    ).then(function(){\n                            \nvar gd = document.getElementById('547a9b79-cba7-44a0-a578-0d2cf9c3e55c');\nvar x = new MutationObserver(function (mutations, observer) {{\n        var display = window.getComputedStyle(gd).display;\n        if (!display || display === 'none') {{\n            console.log([gd, 'removed!']);\n            Plotly.purge(gd);\n            observer.disconnect();\n        }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n    x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n    x.observe(outputEl, {childList: true});\n}}\n\n                        })                };                });            </script>        </div>"
     },
     "metadata": {}
    }
   ],
   "source": [
    "state_df['<b>Conf. C19 <br>per 1K p.c.</b>'] = state_df['confirm_to_1k']\n",
    "fig_emp_scatt = px.scatter(state_df[apr4_idx],x='SAH_cumexp',\n",
    "                           y='cum_claims_to_emp',size='census2010pop',\n",
    "                           size_max=35, hover_data=['state_name'],trendline=\"ols\",                   \n",
    "                           color='<b>Conf. C19 <br>per 1K p.c.</b>',\n",
    "                           color_continuous_scale=px.colors.sequential.gray,)\n",
    "fig_emp_scatt.update_traces(marker=dict(line=dict(width=.75,\n",
    "                                        color='black')),\n",
    "                            selector=dict(mode='markers'))\n",
    "\n",
    "fig_emp_scatt.update_xaxes(title_text='Employment-Weighted Weeks of SAH Exposure',\n",
    "                           tickfont=dict(color='black'),\n",
    "                           title_font=dict(color='black'))\n",
    "fig_emp_scatt.update_yaxes(title_text='Cumulative New Claims for UI (Mar. 15 - Apr. 4)',\n",
    "                           tickfont=dict(color='black'),\n",
    "                           title_font=dict(color='black'))\n",
    "\n",
    "fig_emp_scatt.update_layout(\n",
    "    plot_bgcolor='White'\n",
    ")\n",
    "\n",
    "fig_emp_scatt.show()\n",
    "\n",
    "fig_emp_scatt.write_image(\"../../output/plots/UI-claims-scatter.pdf\", \n",
    "                          width=900, height=500, scale=3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "states = [x for x in list(state_df.state_name.unique()) if x != '']\n",
    "\n",
    "est_dict = {}\n",
    "for state in states:\n",
    "    results = smf.ols('cum_claims_to_emp ~ SAH_cumexp + confirm_to_1k ' + \\\n",
    "                      '+ middle_to_1k + wah + replacementrate',\n",
    "                      data=state_df[apr4_idx].loc[state_df[apr4_idx]\n",
    "                                             .state_name != state]).fit(cov_type='HC1')\n",
    "    est_dict[state] = [results.params['SAH_cumexp'],results.HC1_se['SAH_cumexp']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "output_type": "display_data",
     "data": {
      "application/vnd.plotly.v1+json": {
       "config": {
        "plotlyServerURL": "https://plot.ly"
       },
       "data": [
        {
         "error_y": {
          "array": [
           0.011830481485325266,
           0.011769811227797567,
           0.011753510002302285,
           0.012445118498509287,
           0.013718596422446432,
           0.011896598567573047,
           0.011773492470316239,
           0.012155832736014094,
           0.012026593754695438,
           0.011845584555158137,
           0.011640310063037078,
           0.01171451388648846,
           0.011851895257600586,
           0.012609008636553901,
           0.012119862719045946,
           0.012338929260066552,
           0.011780210569610306,
           0.011761792196104126,
           0.011770235533134324,
           0.011910316756127385,
           0.011736416931569503,
           0.011803704984340297,
           0.011453648956542993,
           0.011803750570971792,
           0.012110374095434416,
           0.01180574571662986,
           0.011748843742474905,
           0.012403289919830432,
           0.011077792230127378,
           0.011617839009185345,
           0.011798305471510806,
           0.011874085289270458,
           0.011751074919793651,
           0.011734793504497857,
           0.012632853895276444,
           0.012209135537271593,
           0.011857446712421794,
           0.011540525513168651,
           0.011662260902869277,
           0.011531520624799842,
           0.012076437817324875,
           0.011120261616885509,
           0.011801052471890987,
           0.011864464753556406,
           0.011855971614671595,
           0.011901673298665325,
           0.01171965289856019,
           0.01192845484107562,
           0.011042315687489581,
           0.011987151844948862,
           0.011998734820784415
          ]
         },
         "hovertemplate": "State Dropped=%{x}<br>beta=%{y}<extra></extra>",
         "legendgroup": "",
         "marker": {
          "color": "#636efa",
          "symbol": "circle"
         },
         "mode": "markers",
         "name": "",
         "orientation": "v",
         "showlegend": false,
         "type": "scatter",
         "x": [
          "ALABAMA",
          "ALASKA",
          "ARIZONA",
          "ARKANSAS",
          "CALIFORNIA",
          "COLORADO",
          "CONNECTICUT",
          "DELAWARE",
          "DISTRICT OF COLUMBIA",
          "FLORIDA",
          "GEORGIA",
          "HAWAII",
          "IDAHO",
          "ILLINOIS",
          "INDIANA",
          "IOWA",
          "KANSAS",
          "KENTUCKY",
          "LOUISIANA",
          "MAINE",
          "MARYLAND",
          "MASSACHUSETTS",
          "MICHIGAN",
          "MINNESOTA",
          "MISSISSIPPI",
          "MISSOURI",
          "MONTANA",
          "NEBRASKA",
          "NEVADA",
          "NEW HAMPSHIRE",
          "NEW JERSEY",
          "NEW MEXICO",
          "NEW YORK",
          "NORTH CAROLINA",
          "NORTH DAKOTA",
          "OHIO",
          "OKLAHOMA",
          "OREGON",
          "PENNSYLVANIA",
          "RHODE ISLAND",
          "SOUTH CAROLINA",
          "SOUTH DAKOTA",
          "TENNESSEE",
          "TEXAS",
          "UTAH",
          "VERMONT",
          "VIRGINIA",
          "WASHINGTON",
          "WEST VIRGINIA",
          "WISCONSIN",
          "WYOMING"
         ],
         "xaxis": "x",
         "y": [
          0.019142554644274543,
          0.018543421213266242,
          0.01871022249050967,
          0.01879396198512549,
          0.018226599513626863,
          0.019330291908351675,
          0.0203445684046553,
          0.018328067553103223,
          0.018384330615600436,
          0.018231093370599086,
          0.019366589449060057,
          0.017561158428274652,
          0.018966312785394616,
          0.020115263543269563,
          0.018989096034023694,
          0.020064238620941907,
          0.018633560725086963,
          0.017946635799793147,
          0.018509918611127024,
          0.01849089383241324,
          0.01874666951470035,
          0.018132516620275037,
          0.017436484752681308,
          0.018432643870744676,
          0.01767628610135004,
          0.0187151727414797,
          0.018659789640270954,
          0.01833510626267709,
          0.021506046605484254,
          0.017867224262620277,
          0.018627118010694648,
          0.019851052846471286,
          0.015862924554834422,
          0.018710656020966877,
          0.01787697808378699,
          0.01763721674583731,
          0.01820406224357854,
          0.020975558693133327,
          0.017757926490447332,
          0.018553812879054787,
          0.01854307470161452,
          0.015355634683607063,
          0.018493597320734044,
          0.019623108251550316,
          0.017383551720751074,
          0.018794004938379436,
          0.01869378103300063,
          0.017709469039430936,
          0.02173079089554382,
          0.019217117574422578,
          0.018170236064835803
         ],
         "yaxis": "y"
        }
       ],
       "layout": {
        "legend": {
         "tracegroupgap": 0
        },
        "margin": {
         "t": 60
        },
        "template": {
         "data": {
          "bar": [
           {
            "error_x": {
             "color": "#2a3f5f"
            },
            "error_y": {
             "color": "#2a3f5f"
            },
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "bar"
           }
          ],
          "barpolar": [
           {
            "marker": {
             "line": {
              "color": "#E5ECF6",
              "width": 0.5
             }
            },
            "type": "barpolar"
           }
          ],
          "carpet": [
           {
            "aaxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "baxis": {
             "endlinecolor": "#2a3f5f",
             "gridcolor": "white",
             "linecolor": "white",
             "minorgridcolor": "white",
             "startlinecolor": "#2a3f5f"
            },
            "type": "carpet"
           }
          ],
          "choropleth": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "choropleth"
           }
          ],
          "contour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "contour"
           }
          ],
          "contourcarpet": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "contourcarpet"
           }
          ],
          "heatmap": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmap"
           }
          ],
          "heatmapgl": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "heatmapgl"
           }
          ],
          "histogram": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "histogram"
           }
          ],
          "histogram2d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2d"
           }
          ],
          "histogram2dcontour": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "histogram2dcontour"
           }
          ],
          "mesh3d": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "type": "mesh3d"
           }
          ],
          "parcoords": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "parcoords"
           }
          ],
          "pie": [
           {
            "automargin": true,
            "type": "pie"
           }
          ],
          "scatter": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter"
           }
          ],
          "scatter3d": [
           {
            "line": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatter3d"
           }
          ],
          "scattercarpet": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattercarpet"
           }
          ],
          "scattergeo": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergeo"
           }
          ],
          "scattergl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattergl"
           }
          ],
          "scattermapbox": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scattermapbox"
           }
          ],
          "scatterpolar": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolar"
           }
          ],
          "scatterpolargl": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterpolargl"
           }
          ],
          "scatterternary": [
           {
            "marker": {
             "colorbar": {
              "outlinewidth": 0,
              "ticks": ""
             }
            },
            "type": "scatterternary"
           }
          ],
          "surface": [
           {
            "colorbar": {
             "outlinewidth": 0,
             "ticks": ""
            },
            "colorscale": [
             [
              0,
              "#0d0887"
             ],
             [
              0.1111111111111111,
              "#46039f"
             ],
             [
              0.2222222222222222,
              "#7201a8"
             ],
             [
              0.3333333333333333,
              "#9c179e"
             ],
             [
              0.4444444444444444,
              "#bd3786"
             ],
             [
              0.5555555555555556,
              "#d8576b"
             ],
             [
              0.6666666666666666,
              "#ed7953"
             ],
             [
              0.7777777777777778,
              "#fb9f3a"
             ],
             [
              0.8888888888888888,
              "#fdca26"
             ],
             [
              1,
              "#f0f921"
             ]
            ],
            "type": "surface"
           }
          ],
          "table": [
           {
            "cells": {
             "fill": {
              "color": "#EBF0F8"
             },
             "line": {
              "color": "white"
             }
            },
            "header": {
             "fill": {
              "color": "#C8D4E3"
             },
             "line": {
              "color": "white"
             }
            },
            "type": "table"
           }
          ]
         },
         "layout": {
          "annotationdefaults": {
           "arrowcolor": "#2a3f5f",
           "arrowhead": 0,
           "arrowwidth": 1
          },
          "coloraxis": {
           "colorbar": {
            "outlinewidth": 0,
            "ticks": ""
           }
          },
          "colorscale": {
           "diverging": [
            [
             0,
             "#8e0152"
            ],
            [
             0.1,
             "#c51b7d"
            ],
            [
             0.2,
             "#de77ae"
            ],
            [
             0.3,
             "#f1b6da"
            ],
            [
             0.4,
             "#fde0ef"
            ],
            [
             0.5,
             "#f7f7f7"
            ],
            [
             0.6,
             "#e6f5d0"
            ],
            [
             0.7,
             "#b8e186"
            ],
            [
             0.8,
             "#7fbc41"
            ],
            [
             0.9,
             "#4d9221"
            ],
            [
             1,
             "#276419"
            ]
           ],
           "sequential": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ],
           "sequentialminus": [
            [
             0,
             "#0d0887"
            ],
            [
             0.1111111111111111,
             "#46039f"
            ],
            [
             0.2222222222222222,
             "#7201a8"
            ],
            [
             0.3333333333333333,
             "#9c179e"
            ],
            [
             0.4444444444444444,
             "#bd3786"
            ],
            [
             0.5555555555555556,
             "#d8576b"
            ],
            [
             0.6666666666666666,
             "#ed7953"
            ],
            [
             0.7777777777777778,
             "#fb9f3a"
            ],
            [
             0.8888888888888888,
             "#fdca26"
            ],
            [
             1,
             "#f0f921"
            ]
           ]
          },
          "colorway": [
           "#636efa",
           "#EF553B",
           "#00cc96",
           "#ab63fa",
           "#FFA15A",
           "#19d3f3",
           "#FF6692",
           "#B6E880",
           "#FF97FF",
           "#FECB52"
          ],
          "font": {
           "color": "#2a3f5f"
          },
          "geo": {
           "bgcolor": "white",
           "lakecolor": "white",
           "landcolor": "#E5ECF6",
           "showlakes": true,
           "showland": true,
           "subunitcolor": "white"
          },
          "hoverlabel": {
           "align": "left"
          },
          "hovermode": "closest",
          "mapbox": {
           "style": "light"
          },
          "paper_bgcolor": "white",
          "plot_bgcolor": "#E5ECF6",
          "polar": {
           "angularaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "radialaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "scene": {
           "xaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "yaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           },
           "zaxis": {
            "backgroundcolor": "#E5ECF6",
            "gridcolor": "white",
            "gridwidth": 2,
            "linecolor": "white",
            "showbackground": true,
            "ticks": "",
            "zerolinecolor": "white"
           }
          },
          "shapedefaults": {
           "line": {
            "color": "#2a3f5f"
           }
          },
          "ternary": {
           "aaxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "baxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           },
           "bgcolor": "#E5ECF6",
           "caxis": {
            "gridcolor": "white",
            "linecolor": "white",
            "ticks": ""
           }
          },
          "title": {
           "x": 0.05
          },
          "xaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          },
          "yaxis": {
           "automargin": true,
           "gridcolor": "white",
           "linecolor": "white",
           "ticks": "",
           "title": {
            "standoff": 15
           },
           "zerolinecolor": "white",
           "zerolinewidth": 2
          }
         }
        },
        "xaxis": {
         "anchor": "y",
         "domain": [
          0,
          1
         ],
         "title": {
          "text": "State Dropped from Benchmark Specification (90% CI)"
         }
        },
        "yaxis": {
         "anchor": "x",
         "domain": [
          0,
          1
         ],
         "rangemode": "tozero",
         "title": {
          "text": "Estimated Coefficient on SAH Exposure"
         }
        }
       }
      },
      "text/html": "<div>                            <div id=\"86850b07-97f7-4eb0-8985-fec90e37a030\" class=\"plotly-graph-div\" style=\"height:525px; width:100%;\"></div>            <script type=\"text/javascript\">                require([\"plotly\"], function(Plotly) {                    window.PLOTLYENV=window.PLOTLYENV || {};                                    if (document.getElementById(\"86850b07-97f7-4eb0-8985-fec90e37a030\")) {                    Plotly.newPlot(                        \"86850b07-97f7-4eb0-8985-fec90e37a030\",                        [{\"error_y\": {\"array\": [0.011830481485325266, 0.011769811227797567, 0.011753510002302285, 0.012445118498509287, 0.013718596422446432, 0.011896598567573047, 0.011773492470316239, 0.012155832736014094, 0.012026593754695438, 0.011845584555158137, 0.011640310063037078, 0.01171451388648846, 0.011851895257600586, 0.012609008636553901, 0.012119862719045946, 0.012338929260066552, 0.011780210569610306, 0.011761792196104126, 0.011770235533134324, 0.011910316756127385, 0.011736416931569503, 0.011803704984340297, 0.011453648956542993, 0.011803750570971792, 0.012110374095434416, 0.01180574571662986, 0.011748843742474905, 0.012403289919830432, 0.011077792230127378, 0.011617839009185345, 0.011798305471510806, 0.011874085289270458, 0.011751074919793651, 0.011734793504497857, 0.012632853895276444, 0.012209135537271593, 0.011857446712421794, 0.011540525513168651, 0.011662260902869277, 0.011531520624799842, 0.012076437817324875, 0.011120261616885509, 0.011801052471890987, 0.011864464753556406, 0.011855971614671595, 0.011901673298665325, 0.01171965289856019, 0.01192845484107562, 0.011042315687489581, 0.011987151844948862, 0.011998734820784415]}, \"hovertemplate\": \"State Dropped=%{x}<br>beta=%{y}<extra></extra>\", \"legendgroup\": \"\", \"marker\": {\"color\": \"#636efa\", \"symbol\": \"circle\"}, \"mode\": \"markers\", \"name\": \"\", \"orientation\": \"v\", \"showlegend\": false, \"type\": \"scatter\", \"x\": [\"ALABAMA\", \"ALASKA\", \"ARIZONA\", \"ARKANSAS\", \"CALIFORNIA\", \"COLORADO\", \"CONNECTICUT\", \"DELAWARE\", \"DISTRICT OF COLUMBIA\", \"FLORIDA\", \"GEORGIA\", \"HAWAII\", \"IDAHO\", \"ILLINOIS\", \"INDIANA\", \"IOWA\", \"KANSAS\", \"KENTUCKY\", \"LOUISIANA\", \"MAINE\", \"MARYLAND\", \"MASSACHUSETTS\", \"MICHIGAN\", \"MINNESOTA\", \"MISSISSIPPI\", \"MISSOURI\", \"MONTANA\", \"NEBRASKA\", \"NEVADA\", \"NEW HAMPSHIRE\", \"NEW JERSEY\", \"NEW MEXICO\", \"NEW YORK\", \"NORTH CAROLINA\", \"NORTH DAKOTA\", \"OHIO\", \"OKLAHOMA\", \"OREGON\", \"PENNSYLVANIA\", \"RHODE ISLAND\", \"SOUTH CAROLINA\", \"SOUTH DAKOTA\", \"TENNESSEE\", \"TEXAS\", \"UTAH\", \"VERMONT\", \"VIRGINIA\", \"WASHINGTON\", \"WEST VIRGINIA\", \"WISCONSIN\", \"WYOMING\"], \"xaxis\": \"x\", \"y\": [0.019142554644274543, 0.018543421213266242, 0.01871022249050967, 0.01879396198512549, 0.018226599513626863, 0.019330291908351675, 0.0203445684046553, 0.018328067553103223, 0.018384330615600436, 0.018231093370599086, 0.019366589449060057, 0.017561158428274652, 0.018966312785394616, 0.020115263543269563, 0.018989096034023694, 0.020064238620941907, 0.018633560725086963, 0.017946635799793147, 0.018509918611127024, 0.01849089383241324, 0.01874666951470035, 0.018132516620275037, 0.017436484752681308, 0.018432643870744676, 0.01767628610135004, 0.0187151727414797, 0.018659789640270954, 0.01833510626267709, 0.021506046605484254, 0.017867224262620277, 0.018627118010694648, 0.019851052846471286, 0.015862924554834422, 0.018710656020966877, 0.01787697808378699, 0.01763721674583731, 0.01820406224357854, 0.020975558693133327, 0.017757926490447332, 0.018553812879054787, 0.01854307470161452, 0.015355634683607063, 0.018493597320734044, 0.019623108251550316, 0.017383551720751074, 0.018794004938379436, 0.01869378103300063, 0.017709469039430936, 0.02173079089554382, 0.019217117574422578, 0.018170236064835803], \"yaxis\": \"y\"}],                        {\"legend\": {\"tracegroupgap\": 0}, \"margin\": {\"t\": 60}, \"template\": {\"data\": {\"bar\": [{\"error_x\": {\"color\": \"#2a3f5f\"}, \"error_y\": {\"color\": \"#2a3f5f\"}, \"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"bar\"}], \"barpolar\": [{\"marker\": {\"line\": {\"color\": \"#E5ECF6\", \"width\": 0.5}}, \"type\": \"barpolar\"}], \"carpet\": [{\"aaxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"baxis\": {\"endlinecolor\": \"#2a3f5f\", \"gridcolor\": \"white\", \"linecolor\": \"white\", \"minorgridcolor\": \"white\", \"startlinecolor\": \"#2a3f5f\"}, \"type\": \"carpet\"}], \"choropleth\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"choropleth\"}], \"contour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"contour\"}], \"contourcarpet\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"contourcarpet\"}], \"heatmap\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmap\"}], \"heatmapgl\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"heatmapgl\"}], \"histogram\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"histogram\"}], \"histogram2d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2d\"}], \"histogram2dcontour\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"histogram2dcontour\"}], \"mesh3d\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"type\": \"mesh3d\"}], \"parcoords\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"parcoords\"}], \"pie\": [{\"automargin\": true, \"type\": \"pie\"}], \"scatter\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter\"}], \"scatter3d\": [{\"line\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatter3d\"}], \"scattercarpet\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattercarpet\"}], \"scattergeo\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergeo\"}], \"scattergl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattergl\"}], \"scattermapbox\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scattermapbox\"}], \"scatterpolar\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolar\"}], \"scatterpolargl\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterpolargl\"}], \"scatterternary\": [{\"marker\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"type\": \"scatterternary\"}], \"surface\": [{\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}, \"colorscale\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"type\": \"surface\"}], \"table\": [{\"cells\": {\"fill\": {\"color\": \"#EBF0F8\"}, \"line\": {\"color\": \"white\"}}, \"header\": {\"fill\": {\"color\": \"#C8D4E3\"}, \"line\": {\"color\": \"white\"}}, \"type\": \"table\"}]}, \"layout\": {\"annotationdefaults\": {\"arrowcolor\": \"#2a3f5f\", \"arrowhead\": 0, \"arrowwidth\": 1}, \"coloraxis\": {\"colorbar\": {\"outlinewidth\": 0, \"ticks\": \"\"}}, \"colorscale\": {\"diverging\": [[0, \"#8e0152\"], [0.1, \"#c51b7d\"], [0.2, \"#de77ae\"], [0.3, \"#f1b6da\"], [0.4, \"#fde0ef\"], [0.5, \"#f7f7f7\"], [0.6, \"#e6f5d0\"], [0.7, \"#b8e186\"], [0.8, \"#7fbc41\"], [0.9, \"#4d9221\"], [1, \"#276419\"]], \"sequential\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]], \"sequentialminus\": [[0.0, \"#0d0887\"], [0.1111111111111111, \"#46039f\"], [0.2222222222222222, \"#7201a8\"], [0.3333333333333333, \"#9c179e\"], [0.4444444444444444, \"#bd3786\"], [0.5555555555555556, \"#d8576b\"], [0.6666666666666666, \"#ed7953\"], [0.7777777777777778, \"#fb9f3a\"], [0.8888888888888888, \"#fdca26\"], [1.0, \"#f0f921\"]]}, \"colorway\": [\"#636efa\", \"#EF553B\", \"#00cc96\", \"#ab63fa\", \"#FFA15A\", \"#19d3f3\", \"#FF6692\", \"#B6E880\", \"#FF97FF\", \"#FECB52\"], \"font\": {\"color\": \"#2a3f5f\"}, \"geo\": {\"bgcolor\": \"white\", \"lakecolor\": \"white\", \"landcolor\": \"#E5ECF6\", \"showlakes\": true, \"showland\": true, \"subunitcolor\": \"white\"}, \"hoverlabel\": {\"align\": \"left\"}, \"hovermode\": \"closest\", \"mapbox\": {\"style\": \"light\"}, \"paper_bgcolor\": \"white\", \"plot_bgcolor\": \"#E5ECF6\", \"polar\": {\"angularaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"radialaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"scene\": {\"xaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"yaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}, \"zaxis\": {\"backgroundcolor\": \"#E5ECF6\", \"gridcolor\": \"white\", \"gridwidth\": 2, \"linecolor\": \"white\", \"showbackground\": true, \"ticks\": \"\", \"zerolinecolor\": \"white\"}}, \"shapedefaults\": {\"line\": {\"color\": \"#2a3f5f\"}}, \"ternary\": {\"aaxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"baxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}, \"bgcolor\": \"#E5ECF6\", \"caxis\": {\"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\"}}, \"title\": {\"x\": 0.05}, \"xaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}, \"yaxis\": {\"automargin\": true, \"gridcolor\": \"white\", \"linecolor\": \"white\", \"ticks\": \"\", \"title\": {\"standoff\": 15}, \"zerolinecolor\": \"white\", \"zerolinewidth\": 2}}}, \"xaxis\": {\"anchor\": \"y\", \"domain\": [0.0, 1.0], \"title\": {\"text\": \"State Dropped from Benchmark Specification (90% CI)\"}}, \"yaxis\": {\"anchor\": \"x\", \"domain\": [0.0, 1.0], \"rangemode\": \"tozero\", \"title\": {\"text\": \"Estimated Coefficient on SAH Exposure\"}}},                        {\"responsive\": true}                    ).then(function(){\n                            \nvar gd = document.getElementById('86850b07-97f7-4eb0-8985-fec90e37a030');\nvar x = new MutationObserver(function (mutations, observer) {{\n        var display = window.getComputedStyle(gd).display;\n        if (!display || display === 'none') {{\n            console.log([gd, 'removed!']);\n            Plotly.purge(gd);\n            observer.disconnect();\n        }}\n}});\n\n// Listen for the removal of the full notebook cells\nvar notebookContainer = gd.closest('#notebook-container');\nif (notebookContainer) {{\n    x.observe(notebookContainer, {childList: true});\n}}\n\n// Listen for the clearing of the current output cell\nvar outputEl = gd.closest('.output');\nif (outputEl) {{\n    x.observe(outputEl, {childList: true});\n}}\n\n                        })                };                });            </script>        </div>"
     },
     "metadata": {}
    }
   ],
   "source": [
    "drop_state = pd.DataFrame.from_dict(est_dict).transpose()\n",
    "drop_state.columns = ['beta','se']\n",
    "drop_state.reset_index(inplace=True)\n",
    "drop_state.rename(columns = {'index': 'State Dropped'},inplace=True)\n",
    "\n",
    "drop_state['CI (90%)'] = drop_state['se']*norm.ppf(0.95)\n",
    "\n",
    "fig_drop = px.scatter(drop_state, x=\"State Dropped\", y=\"beta\", error_y=\"CI (90%)\")\n",
    "\n",
    "fig_drop.update_xaxes(title_text='State Dropped from Benchmark Specification (90% CI)')\n",
    "fig_drop.update_yaxes(title_text='Estimated Coefficient on SAH Exposure',rangemode=\"tozero\")\n",
    "\n",
    "\n",
    "fig_drop.show()\n",
    "\n",
    "fig_drop.write_image(\"../../output/plots/drop_states_main.png\", \n",
    "                     width=1200, height=600, scale=3)"
   ]
  }
 ],
 "metadata": {
  "file_extension": ".py",
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3-final"
  },
  "mimetype": "text/x-python",
  "name": "python",
  "npconvert_exporter": "python",
  "pygments_lexer": "ipython3",
  "version": 3
 },
 "nbformat": 4,
 "nbformat_minor": 2
}